.container-fluid
	.row
		.col-md-4: .well
			h4 chunk id
			= id
		.col-md-4: .well
			h4 size
			= require("../../formatSize")(chunk.size)
		.col-md-4: .well
			h4 names
			each name in chunk.names
				code= name
	.row
		if chunk.parents.length && chunk.children.length
			.col-md-3: .well
				h4 parents
				each parent in chunk.parents
					a.btn.btn-info(href=`#chunk/${parent}`)= parent
					= " "
			.col-md-3: .well
				h4 children
				each child in chunk.children
					a.btn.btn-info(href=`#chunk/${child}`)= child
					= " "
		else if chunk.parents.length
			.col-md-6: .well
				h4 parents
				each parent in chunk.parents
					a.btn.btn-info(href=`#chunk/${parent}`)= parent
					= " "
		else if chunk.children.length
			.col-md-6: .well
				h4 children
				each child in chunk.children
					a.btn.btn-info(href=`#chunk/${child}`)= child
					= " "
		.col-md-6: .well
			h4 files
			each file in chunk.files
				a.btn.btn-default(href="#assets")= file
				= " "
	.row
		.col-md-12: .well
			h4 origins
			table.table.table-condensed
				thead
					tr
						th reasons
						th name
						th(colspan="2") module
						th location
				tbody
					each origin in chunk.origins
						tr
							td
								if Array.isArray(origin.reasons)
									each reason in origin.reasons
										code= reason
										= " "
							td: code= origin.name
							td
								if typeof origin.moduleUid === "number"
									a.btn.btn-success(href=`#module/${origin.moduleUid}`)= origin.moduleId
								else
									span.btn.btn-success= origin.moduleId
							td: pre: code= origin.moduleName.split("!").join("\n")
							td
								if origin.loc
									code= origin.loc
	if chunk.modules && chunk.modules.length > 0
		.row: .col-md-12: .well
			h4 modules
			table.table.table-condensed
				thead
					tr
						th id
						th name
						th size
						th chunks
						th flags
				tbody
					each module in chunk.modules
						tr
							td
								if typeof module.uid === "number"
									a.btn.btn-success(href=`#module/${module.uid}`)= module.id
								else
									span.btn.btn-success= module.id
							td: pre: code= module.name.split("!").join("\n")
							td= require("../../formatSize")(module.size)
							td
								each chunk in module.chunks
									a.btn.btn-info(href=`#chunk/${chunk}`)= chunk
									= " "
							td
								if module.built
									span.label.label-success built
									= " "
								if !module.cacheable
									span.label.label-warning not cacheable
									= " "
								if module.prefetched
									span.label.label-success prefetched
									= " "
								if module.failed
									span.label.label-danger failed
									= " "
								if module.warnings
									span.label.label-warning= module.warnings + " warnings"
									= " "
								if module.errors
									span.label.label-danger= module.errors + " errors"
